home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-PPC / INIT.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  62 lines

  1. #ifndef _PPC_INIT_H
  2. #define _PPC_INIT_H
  3.  
  4. #if __GNUC__ > 2 || __GNUC_MINOR__ >= 90 /* egcs */
  5. #define __init __attribute__ ((__section__ (".text.init")))
  6. #define __initdata __attribute__ ((__section__ (".data.init")))
  7. #define __initfunc(__arginit) \
  8.     __arginit __init; \
  9.     __arginit
  10.  
  11. #define __pmac __attribute__ ((__section__ (".text.pmac")))
  12. #define __pmacdata __attribute__ ((__section__ (".data.pmac")))
  13. #define __pmacfunc(__argpmac) \
  14.     __argpmac __pmac; \
  15.     __argpmac
  16.     
  17. #define __prep __attribute__ ((__section__ (".text.prep")))
  18. #define __prepdata __attribute__ ((__section__ (".data.prep")))
  19. #define __prepfunc(__argprep) \
  20.     __argprep __prep; \
  21.     __argprep
  22.  
  23. /* this is actually just common chrp/pmac code, not OF code -- Cort */
  24. #define __openfirmware __attribute__ ((__section__ (".text.openfirmware")))
  25. #define __openfirmwaredata __attribute__ ((__section__ (".data.openfirmware")))
  26. #define __openfirmwarefunc(__argopenfirmware) \
  27.     __argopenfirmware __openfirmware; \
  28.     __argopenfirmware
  29.     
  30. #define __INIT        .section    ".text.init",#alloc,#execinstr
  31. #define __FINIT    .previous
  32. #define __INITDATA    .section    ".data.init",#alloc,#write
  33.  
  34. #define __cacheline_aligned __attribute__ \
  35.              ((__section__ (".data.cacheline_aligned")))
  36.  
  37. #else /* not egcs */
  38.  
  39. #define __init
  40. #define __initdata
  41. #define __initfunc(x) x
  42.     
  43. #define __INIT
  44. #define __FINIT
  45. #define __INITDATA
  46.     
  47. #define __pmac
  48. #define __pmacdata
  49. #define __pmacfunc(x) x
  50.     
  51. #define __prep
  52. #define __prepdata
  53. #define __prepfunc(x) x
  54.  
  55. #define __openfirmware
  56. #define __openfirmwaredata
  57. #define __openfirmwarefunc(x) x
  58.  
  59. #define __cacheline_aligned
  60. #endif /* egcs */
  61. #endif
  62.